home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 4
/
Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso
/
Science
/
RLaB
/
help
/
BREAK
< prev
next >
Wrap
Text File
|
1994-04-25
|
422b
|
26 lines
BREAK:
The break statement functions similar to the C break. The
break statement provides an early exit from the enclosing for,
or while loop. For example:
> while ( i < 100 ) {
> if(i == 10) { break; }
> i++;
> }
> i
i =
10
//
// OR
//
> i=0;j=0;
> while (i < 5) { while (j < 5) { if (j == 3) { break } j++; } i++; } i j
i =
5
j =
3
See Also: CONTINUE, FOR, WHILE